﻿namespace ACCOUNTING
{
    using ACCOUNTING.LVY.Business;
    using ACCOUNTING.My.Resources;
    using Microsoft.VisualBasic;
    using Microsoft.VisualBasic.CompilerServices;
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Diagnostics;
    using System.Drawing;
    using System.Runtime.CompilerServices;
    using System.Windows.Forms;

    [DesignerGenerated]
    public class Frm_GetDataFromLocalSystem : Form
    {
        private static List<WeakReference> __ENCList = new List<WeakReference>();
        [AccessedThroughProperty("CKSoDuTaiKhoan")]
        private CheckBox _CKSoDuTaiKhoan;
        [AccessedThroughProperty("CmdCancel")]
        private Button _CmdCancel;
        [AccessedThroughProperty("CmdOK")]
        private Button _CmdOK;
        [AccessedThroughProperty("GroupBox1")]
        private GroupBox _GroupBox1;
        [AccessedThroughProperty("Label1")]
        private Label _Label1;
        [AccessedThroughProperty("Label2")]
        private Label _Label2;
        [AccessedThroughProperty("updNam")]
        private NumericUpDown _updNam;
        [AccessedThroughProperty("updThang")]
        private NumericUpDown _updThang;
        private IContainer components;
        private bool mAllowAdd;
        private bool mAllowDel;
        private bool mAllowEdit;
        private bool mAllowView;

        [DebuggerNonUserCode]
        public Frm_GetDataFromLocalSystem()
        {
            base.Load += new EventHandler(this.Frm_GetDataFromLocalSystem_Load);
            List<WeakReference> list = __ENCList;
            lock (list)
            {
                __ENCList.Add(new WeakReference(this));
            }
            this.InitializeComponent();
        }

        private void CmdCancel_Click(object sender, EventArgs e)
        {
            this.Dispose();
        }

        private void CmdOK_Click(object sender, EventArgs e)
        {
            this.GetData();
        }

        [DebuggerNonUserCode]
        protected override void Dispose(bool disposing)
        {
            try
            {
                if (disposing && (this.components != null))
                {
                    this.components.Dispose();
                }
            }
            finally
            {
                base.Dispose(disposing);
            }
        }

        private void Frm_GetDataFromLocalSystem_Load(object sender, EventArgs e)
        {
            this.Cursor = Cursors.WaitCursor;
            LVYModule.GetUserRight(ref this.mAllowView, ref this.mAllowDel, ref this.mAllowEdit, ref this.mAllowAdd, Conversions.ToString(this.Tag), modGeneral.H_USERNAME);
            if (!this.mAllowView)
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Bạn kh\x00f4ng c\x00f3 quyền sử dụng chức năng n\x00e0y, li\x00ean hệ với người quản trị để biết th\x00eam chi tiết.", ""));
                this.Dispose();
            }
            else
            {
                this.updThang.Value = new decimal(DateAndTime.Month(DateAndTime.Today));
                this.updNam.Value = new decimal(DateAndTime.Year(DateAndTime.Today));
                this.Cursor = Cursors.Default;
            }
        }

        public bool GetData()
        {
            bool flag=false;
            this.Cursor = Cursors.WaitCursor;
            IDataParameter[] commandParameters = new IDataParameter[4];
            string str = Conversions.ToString(this.updNam.Value) + LVYModule.sRight("00" + Conversions.ToString(this.updThang.Value), 2);
            try
            {
                commandParameters[0] = DBHelper.createParameter("@NamThang", DbType.Int64, ParameterDirection.Input, str);
                commandParameters[1] = DBHelper.createParameter("@KhoaDonVi", DbType.Int64, ParameterDirection.Input, modGeneral.H_CLIENT);
                commandParameters[2] = DBHelper.createParameter("@DbName", DbType.Int64, ParameterDirection.Input, "Dragon");
                commandParameters[3] = DBHelper.createParameter("@pError", DbType.Double, ParameterDirection.Output, 0);
                DBHelper.ExecuteNonQuery(modGeneral.ConnectionString, CommandType.StoredProcedure, "HT_GetDataFromLocalSystem", commandParameters);
                this.Cursor = Cursors.Default;
                if (Microsoft.VisualBasic.CompilerServices.Operators.ConditionalCompareObjectNotEqual(commandParameters[3].Value, 0, false))
                {
                    LVYModule.ShowWarning(modGeneral.Tranlated("Nghiệp vụ kh\x00f4ng thực hiện th\x00e0nh c\x00f4ng", ""));
                    return false;
                }
                LVYModule.ShowWarning(modGeneral.Tranlated("Nghiệp vụ thực hiện th\x00e0nh c\x00f4ng", ""));
                flag = true;
            }
            catch (Exception exception1)
            {
                ProjectData.SetProjectError(exception1);
                Exception exception = exception1;
                this.Cursor = Cursors.Default;
                MessageBox.Show(exception.Message);
                flag = false;
                ProjectData.ClearProjectError();
                return flag;
                ProjectData.ClearProjectError();
            }
            return flag;
        }

        [DebuggerStepThrough]
        private void InitializeComponent()
        {
            ComponentResourceManager manager = new ComponentResourceManager(typeof(Frm_GetDataFromLocalSystem));
            this.GroupBox1 = new GroupBox();
            this.CKSoDuTaiKhoan = new CheckBox();
            this.Label2 = new Label();
            this.updNam = new NumericUpDown();
            this.Label1 = new Label();
            this.updThang = new NumericUpDown();
            this.CmdCancel = new Button();
            this.CmdOK = new Button();
            this.GroupBox1.SuspendLayout();
            this.updNam.BeginInit();
            this.updThang.BeginInit();
            this.SuspendLayout();
            this.GroupBox1.BackColor = Color.Transparent;
            this.GroupBox1.Controls.Add(this.CKSoDuTaiKhoan);
            this.GroupBox1.Controls.Add(this.Label2);
            this.GroupBox1.Controls.Add(this.updNam);
            this.GroupBox1.Controls.Add(this.Label1);
            this.GroupBox1.Controls.Add(this.updThang);
            Point point = new Point(12, 12);
            this.GroupBox1.Location = point;
            this.GroupBox1.Name = "GroupBox1";
            Size size = new Size(0x131, 120);
            this.GroupBox1.Size = size;
            this.GroupBox1.TabIndex = 13;
            this.GroupBox1.TabStop = false;
            this.GroupBox1.Text = "T\x00f9y chọn";
            this.CKSoDuTaiKhoan.AutoSize = true;
            this.CKSoDuTaiKhoan.Checked = true;
            this.CKSoDuTaiKhoan.CheckState = CheckState.Checked;
            point = new Point(0x59, 0x44);
            this.CKSoDuTaiKhoan.Location = point;
            this.CKSoDuTaiKhoan.Name = "CKSoDuTaiKhoan";
            size = new Size(0x5c, 0x11);
            this.CKSoDuTaiKhoan.Size = size;
            this.CKSoDuTaiKhoan.TabIndex = 13;
            this.CKSoDuTaiKhoan.Text = "Ghi đ\x00e8 dữ liệu";
            this.CKSoDuTaiKhoan.UseVisualStyleBackColor = true;
            this.Label2.AutoSize = true;
            point = new Point(0x98, 0x19);
            this.Label2.Location = point;
            this.Label2.Name = "Label2";
            size = new Size(0x1d, 13);
            this.Label2.Size = size;
            this.Label2.TabIndex = 11;
            this.Label2.Text = "Năm";
            point = new Point(0xc5, 0x17);
            this.updNam.Location = point;
            decimal num = new decimal(new int[] { 0x9c4, 0, 0, 0 });
            this.updNam.Maximum = num;
            num = new decimal(new int[] { 0x7d0, 0, 0, 0 });
            this.updNam.Minimum = num;
            this.updNam.Name = "updNam";
            size = new Size(0x3a, 20);
            this.updNam.Size = size;
            this.updNam.TabIndex = 10;
            num = new decimal(new int[] { 0x7d0, 0, 0, 0 });
            this.updNam.Value = num;
            this.Label1.AutoSize = true;
            point = new Point(0x2b, 0x1b);
            this.Label1.Location = point;
            this.Label1.Name = "Label1";
            size = new Size(0x26, 13);
            this.Label1.Size = size;
            this.Label1.TabIndex = 9;
            this.Label1.Text = "Th\x00e1ng";
            point = new Point(0x59, 0x18);
            this.updThang.Location = point;
            num = new decimal(new int[] { 12, 0, 0, 0 });
            this.updThang.Maximum = num;
            num = new decimal(new int[] { 1, 0, 0, 0 });
            this.updThang.Minimum = num;
            this.updThang.Name = "updThang";
            size = new Size(0x2d, 20);
            this.updThang.Size = size;
            this.updThang.TabIndex = 8;
            num = new decimal(new int[] { 1, 0, 0, 0 });
            this.updThang.Value = num;
            this.CmdCancel.DialogResult = DialogResult.Cancel;
            this.CmdCancel.Image = (Image) manager.GetObject("CmdCancel.Image");
            this.CmdCancel.ImageAlign = ContentAlignment.MiddleLeft;
            point = new Point(0xee, 0x93);
            this.CmdCancel.Location = point;
            this.CmdCancel.Name = "CmdCancel";
            size = new Size(0x4f, 0x18);
            this.CmdCancel.Size = size;
            this.CmdCancel.TabIndex = 12;
            this.CmdCancel.Text = "&Tho\x00e1t";
            this.CmdCancel.UseVisualStyleBackColor = true;
            this.CmdOK.Image = (Image) manager.GetObject("CmdOK.Image");
            this.CmdOK.ImageAlign = ContentAlignment.MiddleLeft;
            point = new Point(0x9b, 0x93);
            this.CmdOK.Location = point;
            this.CmdOK.Name = "CmdOK";
            size = new Size(0x4e, 0x18);
            this.CmdOK.Size = size;
            this.CmdOK.TabIndex = 11;
            this.CmdOK.Text = "&Chọn";
            this.CmdOK.UseVisualStyleBackColor = true;
            SizeF ef = new SizeF(6f, 13f);
            this.AutoScaleDimensions = ef;
            this.AutoScaleMode = AutoScaleMode.Font;
            this.BackgroundImage = ACCOUNTING.My.Resources.Resources.background;
            size = new Size(0x148, 0xb5);
            this.ClientSize = size;
            this.ControlBox = false;
            this.Controls.Add(this.GroupBox1);
            this.Controls.Add(this.CmdCancel);
            this.Controls.Add(this.CmdOK);
            this.FormBorderStyle = FormBorderStyle.FixedDialog;
            this.MaximizeBox = false;
            this.MinimizeBox = false;
            this.Name = "Frm_GetDataFromLocalSystem";
            this.StartPosition = FormStartPosition.CenterScreen;
            this.Tag = "TH-0017";
            this.Text = "LAY DU LIEU TU HE THONG NOI BO";
            this.GroupBox1.ResumeLayout(false);
            this.GroupBox1.PerformLayout();
            this.updNam.EndInit();
            this.updThang.EndInit();
            this.ResumeLayout(false);
        }

        internal virtual CheckBox CKSoDuTaiKhoan
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CKSoDuTaiKhoan;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._CKSoDuTaiKhoan = value;
            }
        }

        internal virtual Button CmdCancel
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdCancel;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdCancel_Click);
                if (this._CmdCancel != null)
                {
                    this._CmdCancel.Click -= handler;
                }
                this._CmdCancel = value;
                if (this._CmdCancel != null)
                {
                    this._CmdCancel.Click += handler;
                }
            }
        }

        internal virtual Button CmdOK
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdOK;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdOK_Click);
                if (this._CmdOK != null)
                {
                    this._CmdOK.Click -= handler;
                }
                this._CmdOK = value;
                if (this._CmdOK != null)
                {
                    this._CmdOK.Click += handler;
                }
            }
        }

        internal virtual GroupBox GroupBox1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._GroupBox1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._GroupBox1 = value;
            }
        }

        internal virtual Label Label1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label1 = value;
            }
        }

        internal virtual Label Label2
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label2;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label2 = value;
            }
        }

        internal virtual NumericUpDown updNam
        {
            [DebuggerNonUserCode]
            get
            {
                return this._updNam;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._updNam = value;
            }
        }

        internal virtual NumericUpDown updThang
        {
            [DebuggerNonUserCode]
            get
            {
                return this._updThang;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._updThang = value;
            }
        }
    }
}

